package com.hyg.lib_base.MyView.SDCardImageSelect;



import com.hyg.lib_base.mainUtils.Utils;

import java.util.ArrayList;

public class Folder {
    private String name = "";
    private ArrayList<Image> images = new ArrayList<>();

    public Folder(String name) {
        this.name = name;
    }

    public Folder(String name, ArrayList<Image> images) {
        this.name = name;
        this.images = images;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ArrayList<Image> getImages() {
        return images;
    }

    public void setImages(ArrayList<Image> images) {
        this.images = images;
    }

    public void addImage(Image image) {
        if (!Utils.isEmpty(image.getPath())) {
            if (images == null) {
                images = new ArrayList<>();
            }
            images.add(image);
        }
    }

}
